package com.kan.awaits.mongo;

import java.net.UnknownHostException;

import com.mongodb.Mongo;
import com.mongodb.MongoException;

public class ConfigurationImpl implements Configuration
{
	private String dbName;

	private Mongo mongo;

	private String host;

	private int port;

	private Datastore datastore;

	public Datastore getDatastore() throws UnknownHostException, MongoException
	{
		if (datastore == null)
		{
			datastore = new DatastoreImpl();
		}
		return datastore;
	}

	public Mongo getMongo() throws UnknownHostException, MongoException
	{
		if (mongo == null)
		{
			mongo = new Mongo(host, port);
		}
		return mongo;
	}

	public void setAutoMap(boolean autoMap)
	{

	}

	public void setHostName(String hostName)
	{

	}

	public void setHostPort(int port)
	{

	}

}
